<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="app" uri="http://www.wanrenhui.com" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
	  <%@include file="/res/include/base-head.jsp"%>
	  <%@include file="/res/include/jquery-easyui.jsp"%>
	<script type="text/javascript" src="${pageContext.request.contextPath}/res/js/hi/hiRuleResult.js"></script>
  </head>
  <body>
	<div class="easyui-layout" data-options="fit:true">
	<div data-options="region:'north',border:false,split:false">
	    	<form id="query-form" class="search_form clearfix">
	            <dl>
					<dt>用户呢称：</dt>
					<dd>
						<input name="userNick" id="userNick" type="text" class="txt" maxlength="64"/>
					</dd>
				</dl>
				<dl>
					<dt>电话号码：</dt>
					<dd>
						<input name="userPhone" id="userPhone" type="text" class="txt" maxlength="15"/>
					</dd>
				</dl>
				<dl>
	                <dt>获得途径：</dt>
	                <dd>
	                	<select name="way" id="way" class="txt grid-8">
	                		<option value="">--请选择--</option>
	                		<option value="1">荣誉系统</option>
	                		<option value="2">后台人工</option>
	                	</select>
	                </dd>
	            </dl>
	            <dl>
	                <dt>增减标识：</dt>
	                <dd>
	                	<select name="addDeleFlag" id="addDeleFlag" class="txt grid-8">
	                		<option value="">--请选择--</option>
	                		<option value="1">增加</option>
	                		<option value="2">减少</option>
	                	</select>
	                </dd>
	            </dl>
	            <dl>
	            	<dt>创建时间：从</dt>
	                <dd>
		                <input name="startAtStr" id="startAtStr" type="text" class="txt easyui-datetimebox" maxlength="19"/> 到 
		                <input name="endAtStr" id="endAtStr" type="text" class="txt easyui-datetimebox" maxlength="19"/>
	                </dd>
	            </dl>
	            <p class="search_form_btn">
	            	<input type="button" value="搜索" class="icon_serach" onclick="admin.hiRuleResult.query()" />
	            </p>
	        </form>
	  	</div>
		   <div data-options="region:'center',border:false">
			    <table id="datagrid" data-options="url:'${pageContext.request.contextPath}/hi/rule/result/list',toolbar:'#toolbar'">
					<thead>
						<tr>
							<th data-options="field:'nick',width:100,align:'center' ">用户名</th>
							<th data-options="field:'strNewAt',width:120,align:'center' ">创建时间</th>
							<th data-options="field:'ruleName',width:120,align:'center' ">规则名</th>
							<th data-options="field:'strClassify',width:120,align:'left' ">分类</th>
							<th data-options="field:'way',width:100,align:'center',formatter:formatWay">获得途径</th>
							<th data-options="field:'addDeleFlag',width:100,align:'center',formatter:formatAddDeleFlag">增减标识</th>
							<th data-options="field:'desc',width:150,align:'left' ">奖励描述</th>
							<th data-options="field:'honorValue',width:80,align:'center' ">奖励荣誉值</th>
							<th data-options="field:'quanValue',width:80,align:'center' ">奖励圈币值</th>
							<th data-options="field:'honorBalance',width:80,align:'center' ">荣誉余额</th>
							<th data-options="field:'quanBalance',width:80,align:'center' ">圈币余额</th>
							<th data-options="field:'times',width:80,align:'center' ">累计次数</th>
				            <th data-options="field:'id',align:'center',width:200,formatter:formatOperation">管理操作</th>
						</tr>
					</thead>
				</table>
	  	  </div>
	</div>
	<script>
		function formatOperation(value,row,index) {
			var l_html = '';
			l_html += '<a href="javascript:;" class="table_link" onclick="admin.hiRuleResult.detail('+row.id+')">查看</a>';
			return l_html;
		}
		function formatWay(way) {
			var l_html = '';//是否有效:1-正常;2-失效'
			if(way==1){
				l_html="荣誉系统";
			} else if(way==2){
				l_html="后台人工";
			}
			return l_html;
		}
		function formatAddDeleFlag(flag) {
			var l_html = '';//增减标识:1-增加;2-减少'
			if(flag==1){
				l_html="增加";
			} else if(flag==2){
				l_html="减少";
			}
			return l_html;
		}
	</script>
  </body>
</html>
